<template>
	<view>
		<view class="store_list flex">
			<image src="../../static/news.png" mode=""></image>
			<view class="itemright">
				<view class="flex">
					<view class="istag">茶馆</view>
					<view class="name">百年老茶馆</view>
				</view>
				<view class="km">距离：10km</view>
				<view class="isAddress">地址：北京市朝阳区二三路与五六路交叉…</view>
			</view>
		</view>
		<view class="order flex-between">
			<view class="">订单编号</view>
			<view class="flex">1234567894123 <image src="../../static/copy(1).png" mode=""></image>
			</view>
		</view>
		<view class="order flex-between">
			<view class="">订单金额</view>
			<view class="num">￥123.45</view>
		</view>
		<view class="order flex-between" @click="showtype=true">
			<view class="">支付方式</view>
			<view class="flex order_right">
				<view class="">{{paytype?paytype:'请选择支付方式'}}</view>
				<image src="../../static/down.png" mode=""></image>
			</view>
		</view>
		<u-picker :show="showtype" keyName='name' @cancel='showtype=false' @confirm="confirm"
			:columns="columns"></u-picker>
		<view class="orderbtn flex-between">
			<view class="left flex">
				<view class="">小计</view>
				<view class="number">468.00</view>
			</view>
			<view class="rightbtn">立即支付</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				columns: [
					[{
						name: '1'
					}, {
						name: '2'
					}]
				],
				showtype: false,
				paytype: ''
			}
		},
		methods: {
			confirm(item) {
				console.log(item)
				this.showtype = false
				this.bid = item.value[0].id
				this.paytype = item.value[0].name
				// this.paytype = item.value[0].type == 'bank' ? '银行卡:' + item.value[0].bankcode : item.value[0].type ==
				// 	'alipay' ? '支付宝:' + item.value[0].phone : "微信:" + item.value[0].phone
				// this.payimg = item.value[0].img
			},
			copy(text) {
				uni.setClipboardData({
					data: text,
					success: () => {
						this.showToast && uni.$u.toast('复制成功')
					},
					fail: () => {
						this.showToast && uni.$u.toast('复制失败')
					},
					complete: () => {
						// this.showTooltip = false
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #F2EDED;
	}

	.store_list {
		width: 690rpx;
		height: 180rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		margin: 30rpx auto 20rpx;

		.itemright {
			margin-left: 16rpx;

			.istag {
				width: 60rpx;
				height: 32rpx;
				background: #FFFFFF;
				border-radius: 8rpx;
				border: 2rpx solid #FF6B4D;
				font-weight: 400;
				font-size: 20rpx;
				color: #FF6B4D;
				text-align: center;
			}

			.name {
				font-weight: 500;
				font-size: 28rpx;
				color: #333333;
			}

			.km,
			.isAddress {
				font-weight: 400;
				font-size: 24rpx;
				color: #666666;
				width: 456rpx;
				// white-space: nowrap;
				// overflow: hidden;
				// text-overflow: ellipsis;
				margin-top: 16rpx;
			}
		}

		image {
			width: 140rpx;
			height: 140rpx;
		}
	}

	.order {
		font-weight: 400;
		font-size: 28rpx;
		color: #333333;
		width: 690rpx;
		height: 80rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		padding: 0 20rpx;
		font-weight: 400;
		font-size: 28rpx;
		color: #333333;
		margin: 0 auto 30rpx;

		.num {
			color: #ED4961;
		}

		image {
			width: 32rpx;
			height: 32rpx;
		}

		.order_right {
			font-weight: 400;
			font-size: 28rpx;
			color: #CCCCCC;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-left: 10rpx;
			}
		}
	}

	.orderbtn {
		padding: 30rpx;
		width: 750rpx;
		position: fixed;
		bottom: 0;

		.left {
			font-weight: 500;
			font-size: 28rpx;
			color: #333333;

			.number {
				font-weight: 600;
				font-size: 28rpx;
				color: #ED4961;
			}
		}

		.rightbtn {
			width: 200rpx;
			height: 72rpx;
			background: #FF5534;
			border-radius: 36rpx;
			text-align: center;
			line-height: 72rpx;
			font-weight: 500;
			font-size: 28rpx;
			color: #FFFFFF;
		}
	}
</style>